set(MOC_HEADERS
    Context.h
)

set(SOURCES
    Context.cpp
    Module.cpp
    Module.h
    UniversalAnalyzer.cpp
    UniversalAnalyzer.h
    arch/Architecture.cpp
    arch/Architecture.h
    arch/Instruction.cpp
    arch/Instruction.h
    arch/Instructions.cpp
    arch/Instructions.h
    arch/Mnemonic.h
    arch/Mnemonics.h
    arch/Operand.h
    arch/Operands.cpp
    arch/Operands.h
    arch/Register.h
    arch/Registers.h
    arch/disasm/Disassembler.cpp
    arch/disasm/Disassembler.h
    arch/disasm/InstructionDisassembler.h
    arch/irgen/Expressions.h
    arch/irgen/IRGenerator.cpp
    arch/irgen/IRGenerator.h
    arch/irgen/InstructionAnalyzer.cpp
    arch/irgen/InstructionAnalyzer.h
    arch/irgen/InvalidInstructionException.cpp
    arch/irgen/InvalidInstructionException.h
    image/BufferByteSource.cpp
    image/BufferByteSource.h
    image/ByteSource.h
    image/Image.cpp
    image/Image.h
    image/Reader.cpp
    image/Reader.h
    image/Section.cpp
    image/Section.h
    input/ParseError.cpp
    input/ParseError.h
    input/Parser.cpp
    input/Parser.h
    input/ParserRepository.cpp
    input/ParserRepository.h
    ir/BasicBlock.cpp
    ir/BasicBlock.h
    ir/CFG.cpp
    ir/CFG.h
    ir/CommentText.cpp
    ir/CommentText.h
    ir/Function.cpp
    ir/Function.h
    ir/Functions.cpp
    ir/Functions.h
    ir/FunctionsGenerator.cpp
    ir/FunctionsGenerator.h
    ir/Jump.cpp
    ir/Jump.h
    ir/JumpTarget.cpp
    ir/JumpTarget.h
    ir/MemoryDomain.h
    ir/MemoryLocation.cpp
    ir/MemoryLocation.h
    ir/Program.cpp
    ir/Program.h
    ir/Statement.cpp
    ir/Statement.h
    ir/Statements.cpp
    ir/Statements.h
    ir/Term.cpp
    ir/Term.h
    ir/Terms.cpp
    ir/Terms.h
    ir/calls/CallAnalyzer.h
    ir/calls/CallingConvention.h
    ir/calls/CallingConventionDetector.h
    ir/calls/CallsData.cpp
    ir/calls/CallsData.h
    ir/calls/DescriptorAnalyzer.h
    ir/calls/FunctionAnalyzer.cpp
    ir/calls/FunctionAnalyzer.h
    ir/calls/FunctionDescriptor.h
    ir/calls/FunctionSignature.h
    ir/calls/GenericCallAnalyzer.cpp
    ir/calls/GenericCallAnalyzer.h
    ir/calls/GenericCallingConvention.cpp
    ir/calls/GenericCallingConvention.h
    ir/calls/GenericDescriptorAnalyzer.cpp
    ir/calls/GenericDescriptorAnalyzer.h
    ir/calls/GenericFunctionAnalyzer.cpp
    ir/calls/GenericFunctionAnalyzer.h
    ir/calls/GenericReturnAnalyzer.cpp
    ir/calls/GenericReturnAnalyzer.h
    ir/calls/ReturnAnalyzer.h
    ir/cflow/BasicNode.cpp
    ir/cflow/BasicNode.h
    ir/cflow/Dfs.cpp
    ir/cflow/Dfs.h
    ir/cflow/Edge.cpp
    ir/cflow/Edge.h
    ir/cflow/Graph.cpp
    ir/cflow/Graph.h
    ir/cflow/GraphBuilder.cpp
    ir/cflow/GraphBuilder.h
    ir/cflow/LoopExplorer.cpp
    ir/cflow/LoopExplorer.h
    ir/cflow/Node.cpp
    ir/cflow/Node.h
    ir/cflow/Region.cpp
    ir/cflow/Region.h
    ir/cflow/StructureAnalyzer.cpp
    ir/cflow/StructureAnalyzer.h
    ir/cflow/Switch.h
    ir/cgen/CodeGenerator.cpp
    ir/cgen/CodeGenerator.h
    ir/cgen/DeclarationGenerator.cpp
    ir/cgen/DeclarationGenerator.h
    ir/cgen/DefinitionGenerator.cpp
    ir/cgen/DefinitionGenerator.h
    ir/cgen/SwitchContext.h
    ir/dflow/Dataflow.cpp
    ir/dflow/Dataflow.h
    ir/dflow/DataflowAnalyzer.cpp
    ir/dflow/DataflowAnalyzer.h
    ir/dflow/ReachingDefinitions.cpp
    ir/dflow/ReachingDefinitions.h
    ir/dflow/SimulationContext.h
    ir/dflow/Utils.cpp
    ir/dflow/Utils.h
    ir/dflow/Value.cpp
    ir/dflow/Value.h
    ir/inlining/CallInliner.cpp
    ir/inlining/CallInliner.h
    ir/misc/ArrayAccess.h
    ir/misc/BoundsCheck.h
    ir/misc/CensusVisitor.cpp
    ir/misc/CensusVisitor.h
    ir/misc/PatternRecognition.cpp
    ir/misc/PatternRecognition.h
    ir/misc/TermToFunction.cpp
    ir/misc/TermToFunction.h
    ir/types/Type.cpp
    ir/types/Type.h
    ir/types/TypeAnalyzer.cpp
    ir/types/TypeAnalyzer.h
    ir/types/Types.cpp
    ir/types/Types.h
    ir/usage/Usage.h
    ir/usage/UsageAnalyzer.cpp
    ir/usage/UsageAnalyzer.h
    ir/vars/Variable.h
    ir/vars/VariableAnalyzer.cpp
    ir/vars/VariableAnalyzer.h
    ir/vars/Variables.cpp
    ir/vars/Variables.h
    likec/ArgumentDeclaration.cpp
    likec/ArgumentDeclaration.h
    likec/BinaryOperator.cpp
    likec/BinaryOperator.h
    likec/Block.cpp
    likec/Block.h
    likec/Break.cpp
    likec/Break.h
    likec/CallOperator.cpp
    likec/CallOperator.h
    likec/CaseLabel.cpp
    likec/CaseLabel.h
    likec/CommentStatement.cpp
    likec/CommentStatement.h
    likec/Commentable.cpp
    likec/Commentable.h
    likec/CompilationUnit.cpp
    likec/CompilationUnit.h
    likec/Continue.cpp
    likec/Continue.h
    likec/Declaration.h
    likec/DefaultLabel.cpp
    likec/DefaultLabel.h
    likec/DoWhile.cpp
    likec/DoWhile.h
    likec/Expression.h
    likec/ExpressionStatement.cpp
    likec/ExpressionStatement.h
    likec/FunctionDeclaration.cpp
    likec/FunctionDeclaration.h
    likec/FunctionDefinition.cpp
    likec/FunctionDefinition.h
    likec/FunctionIdentifier.cpp
    likec/FunctionIdentifier.h
    likec/FunctionPointerType.cpp
    likec/FunctionPointerType.h
    likec/Goto.cpp
    likec/Goto.h
    likec/If.cpp
    likec/If.h
    likec/InlineAssembly.cpp
    likec/InlineAssembly.h
    likec/IntegerConstant.cpp
    likec/IntegerConstant.h
    likec/LabelDeclaration.cpp
    likec/LabelDeclaration.h
    likec/LabelIdentifier.cpp
    likec/LabelIdentifier.h
    likec/LabelStatement.cpp
    likec/LabelStatement.h
    likec/MemberAccessOperator.cpp
    likec/MemberAccessOperator.h
    likec/MemberDeclaration.cpp
    likec/MemberDeclaration.h
    likec/PrintContext.h
    likec/Return.cpp
    likec/Return.h
    likec/Statement.cpp
    likec/Statement.h
    likec/String.cpp
    likec/String.h
    likec/StructType.cpp
    likec/StructType.h
    likec/StructTypeDeclaration.cpp
    likec/StructTypeDeclaration.h
    likec/Switch.cpp
    likec/Switch.h
    likec/Tree.cpp
    likec/Tree.h
    likec/TreeNode.cpp
    likec/TreeNode.h
    likec/Type.h
    likec/Typecast.cpp
    likec/Typecast.h
    likec/Types.cpp
    likec/Types.h
    likec/UnaryOperator.cpp
    likec/UnaryOperator.h
    likec/VariableDeclaration.cpp
    likec/VariableDeclaration.h
    likec/VariableIdentifier.cpp
    likec/VariableIdentifier.h
    likec/While.cpp
    likec/While.h
    mangling/CxxFiltDemangler.cpp
    mangling/CxxFiltDemangler.h
    mangling/Demangler.h
    mangling/GnuDemangler.cpp
    mangling/GnuDemangler.h
    mangling/MsvcDemangler.cpp
    mangling/MsvcDemangler.h
    ${MOC_HEADERS}
)

if(${NC_WITH_LIBIBERTY})
    list(APPEND SOURCES
        mangling/GnuDemangler.cpp
    )
endif()

if(${NC_WITH_UNDNAME})
    list(APPEND SOURCES
        mangling/MsvcDemangler.cpp
    )
endif()

qt4_wrap_cpp(SOURCES ${MOC_HEADERS})

add_library(nc-core ${SOURCES})
target_link_libraries(nc-core nc-common nc-arch-intel nc-input-elf nc-input-pe ${Boost_LIBRARIES} ${QT_LIBRARIES})

if(${NC_WITH_LIBIBERTY})
    target_link_libraries(nc-core iberty)
endif()

if(${NC_WITH_UNDNAME})
    target_link_libraries(nc-core undname)
endif()

# vim:set et sts=4 sw=4 nospell:
